package com.caow.androidktbase.module

import com.caow.androidktbase.http.ApiServer
import com.caow.androidktbase.bean.Student
import com.caow.androidktbase.bean.Teacher
import com.caow.baselibrary.http.BaseHttpManager
import org.koin.dsl.module

/**
 * @Author caow
 * 2022/12/5
 */

val myModule = module {

    // 每次调用get创建新实例
    factory {
        Student("张三")
    }

    // 单例
    single {
        Teacher("李四")
    }

    single {
        BaseHttpManager.create(ApiServer::class.java)
    }
}
